package com.sh.sales.happysales.app;

import com.sh.polymedicine.happysale.net.entity.UserToken;
import com.sh.polymedicine.happysale.result.UserInfoResult;

/**
 * Created by zhouyucheng on 2017/9/26.
 */

public class AppData {
    private  UserInfoResult mUserInfoResult;
    private  UserToken mUserToken;
    private static AppData mAppData;

    public   UserInfoResult getmUserInfoResult() {
        return mUserInfoResult;
    }

    public   void setmUserInfoResult(UserInfoResult mUserInfoResult) {
        this.mUserInfoResult = mUserInfoResult;
    }

    public   UserToken getmUserToken() {
        return mUserToken;
    }

    public   void setmUserToken(UserToken mUserToken) {
        this.mUserToken = mUserToken;
    }

    public AppData(UserInfoResult bmUserInfoResult, UserToken bmUserToken) {
        this.mUserInfoResult = bmUserInfoResult;
        this.mUserToken = bmUserToken;
    }


    public static AppData getInstence() {
        return mAppData;
    }

    public static final class AppDataBuilder {
        private UserInfoResult bmUserInfoResult;
        private UserToken bmUserToken;



        public AppData.AppDataBuilder userInfoResult(UserInfoResult mUserInfoResult) {
            this.bmUserInfoResult = mUserInfoResult;
            return this;
        }

        public AppData.AppDataBuilder userToken(UserToken mUserToken) {
            this.bmUserToken = mUserToken;
            return this;
        }

        public AppData build() {
            mAppData = new AppData(bmUserInfoResult, bmUserToken);
            return mAppData;
        }
    }
}
